import axios from 'axios'

export const findOutStockList = (current, size, inStockVo) => {
  return axios({
    url: '/api/outStock/findOutStockList',
    method: 'post',
    /*localhost:8080/user?id=  方式传值*/
    params: {
      current,
      size
    },
    /*json数据传值*/
    data: inStockVo
  })
}

/*删除入库清单*/
export const del = (id,outNum) => {
  return axios({
    url: '/api/outStock/delOutStock',
    method: 'delete',
    params: {
      id,
      outNum
    }
  })
}

/*恢复入库清单*/
export const back = (id) => {
  return axios({
    url: '/api/outStock/backOutStock',
    method: 'post',
    params: {
      id
    }
  })
}

/*移至回收站*/
export const remove = (id) => {
  return axios({
    url: '/api/outStock/removeOutStock',
    method: 'post',
    params: {
      id
    }
  })
}

/*入库审核通过*/
export const publish = (id,outNum) => {
  return axios({
    url: '/api/outStock/publishOutStock',
    method: 'post',
    params: {
      id,
      outNum
    }
  })
}

/*添加入库申请*/
export const addOutStock = (intoStockVo) => {
  return axios({
    url: '/api/outStock/addOutStock',
    method: 'post',
    data: intoStockVo
  })
}

/*出库详情*/
export const detail = (outNum,consumerId,current) => {
  return axios({
    url: '/api/outStock/detail',
    method: 'post',
    params: {
      outNum,
      consumerId,
      current,
    }
  })
}
